package icu.shaoyayu.common.log;


import icu.shaoyayu.common.log.appender.Appender;

import java.util.List;

/**
 * @author shaoyayu
 * @date 2022/2/10
 * @apiNote
 */
public class CustomLogLogger implements Logger {

    private List<Appender> appenderList;

    public CustomLogLogger(List<Appender> appenderList) {
        this.appenderList = appenderList;
    }

    @Override
    public void output(LoggingEvent msg) {
        for (Appender appender : appenderList) {
            appender.append(msg);
        }
    }

    @Override
    public String getName() {
        return "Default";
    }
}
